﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Meqs.Entity
{
    /// <summary>
    /// 检查单详细
    /// </summary>
    [Serializable]
    public class SheetItems
    {
        private int _rID;
        private int _esID;
        private double _score;
        private string _detail;
        private string _remarks;
        private int _authorID;
        private string _authorName;
        private int _rowNum;

        public SheetItems()
        {
        }

        public SheetItems(int rID, int esID, double score, string detail, string remarks, int authorID, string authorName, int rowNum)
        {
            _rID = rID;
            _esID = esID;
            _score = score;
            _detail = detail;
            _remarks = remarks;
            _authorID = authorID;
            _authorName = authorName;
            _rowNum = rowNum;
        }

        /// <summary>
        /// ID
        /// </summary>
        public int RID
        {
            get { return _rID; }
            set { _rID = value; }
        }

        /// <summary>
        /// 检查单ID
        /// </summary>
        public int EsID
        {
            get { return _esID; }
            set { _esID = value; }
        }

        /// <summary>
        /// 得分
        /// </summary>
        public double Score
        {
            get { return _score; }
            set { _score = value; }
        }

        /// <summary>
        /// 明细
        /// </summary>
        public string Detail
        {
            get { return _detail; }
            set { _detail = value; }
        }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remarks
        {
            get { return _remarks; }
            set { _remarks = value; }
        }

        /// <summary>
        /// 参评人ID
        /// </summary>
        public int AuthorID
        {
            get { return _authorID; }
            set { _authorID = value; }
        }

        /// <summary>
        /// 参评人
        /// </summary>
        public string AuthorName
        {
            get { return _authorName; }
            set { _authorName = value; }
        }

        /// <summary>
        /// 流水号
        /// </summary>
        public int RowNum
        {
            get { return _rowNum; }
            set { _rowNum = value; }
        }

        public bool Equals(SheetItems other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;
            return other._rID == _rID;
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            if (obj.GetType() != typeof (SheetItems)) return false;
            return Equals((SheetItems) obj);
        }

        public override int GetHashCode()
        {
            return _rID;
        }
    }
}
